Parallel processing three-dimensional drawing apparatus for simultaneously mapping a plurality of texture patterns

ABSTRACT

A three-dimensional graphic drawing apparatus having texture pattern memory units which store a texture pattern having a set of texture pixel data designated by two-dimensional ST texture coordinate values. A display memory unit writes a two-dimensional image of a surface shape of a three-dimensional object to an address designated by two-dimensional XY display coordinate values corresponding to a display screen. Mapping units produce two-dimensional UV surface shape coordinate values of a three-dimensional object which are projected onto the two-dimensional UV surface shape. The mapping units convert the coordinate values into two-dimensional ST texture coordinate values, read out corresponding texture pixel data designating the two-dimensional XY display coordinate values corresponding to the two-dimensional UV surface shape coordinate values, and write two-dimensional XY display coordinate values into the display memory unit. A parallel processing unit reads texture pixel data from different coordinate positions from the texture pattern memory unit using a single access of the mapping unit when the texture pattern has been stored into the plurality of texture pattern memory units and enables the texture pixel data to be simultaneously written into the display memory unit. A time-division processing unit selects a texture pattern memory unit when different kinds of texture patterns have been stored into the texture pattern memory units, for sequentially reading the texture pixel data by the mapping units and writes out the texture pixel data to be written into the display memory unit.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to application Ser. No. 08/460,804, filed onJun. 2, 1995 by Takahiro Sakuraba and Hiroshi Nakamura.

BACKGROUND OF THE INVENTION

The present invention relates to a three-dimensional graphics drawingapparatus for developing image data from three-dimensional polygoninformation to pixels by computer processes and for displaying the imagedata and, more particularly, to a 3-dimensional graphics drawingapparatus for performing an expression of a quality feeling by a texturemapping and an image synthesis using an XZ buffer.

Hitherto, there is a texture mapping as a typical method of expressing aquality feeling of 3-dimensional computer graphics. According to thetexture mapping, a material feeling of an object can be formed byrealizing an image which is obtained by a method whereby a texturepattern such as grain pattern, marble pattern, or the like which hasindependently been defined is adhered onto the surface of an objecthaving a three-dimensional shape.

Two-dimensional coordinates which are obtained by projecting the surfaceshape of the 3-dimensional object on which the texture pattern wasadhered are now defined as UV surface shape coordinates. Two-dimensionalcoordinates of a memory in which texture patterns have been stored aredefined as ST texture coordinates. Further, two-dimensional coordinatesof a frame memory to draw the surface shape on which a texture patternhas been mapped are defined as XY display coordinates. The values ofthose coordinates are expressed by small letters such as (u, v), (s, t),and (x, y), respectively.

In the texture mapping, it is a problem how to give the correspondencebetween the XY display coordinates of the frame memory for display andthe ST texture coordinates of the texture pattern memory. In the casewhere the surface shape of a 3-dimensional object on which a texturepattern is adhered is not so geometrically complicated, coordinatevalues (x, t) of a proper texture pattern are given to each vertex of apolygon having a micro triangular or rectangular shape and thecoordinate values which fill the region in the polygon are obtained by alinear interpolation.

The mapping to time frame memory from the memory in which the actualtexture patterns have been stored is realized by a method whereby thetexture pixel data read out from the texture pattern memory is writtenas pixel data (color values) which is written to the pixel positions inthe frame memory.

In this instance, the reading operation of the texture pixel data fromthe texture pattern memory is executed by obtaining the coordinatevalues (s, t) of the ST texture coordinates corresponding to thecoordinate values (u, v) of the UV surface shape coordinates of a3-dimensional object by a linear interpolation. When the texture pixeldata read out from the texture pattern memory is drawn into the framememory, an address is designated by the values (x, y) of the XY displaycoordinates corresponding to the values (u, v) of the UV surface shapecoordinates and the texture pixel data is written in such an address. Inthis case, as compared with a simple painting, the texture pixel data isread out every pixel from the texture pattern memory and written intothe frame memory, so that a problem such that a drawing speed isextremely slow occurs.

To draw a texture pattern at a high speed, it is necessary to executeparallel processes so as to read out and draw a plurality of pixels in alump. In case of using one texture pattern memory, it takes a time toread out a plurality of pixels. Therefore, the same pattern is storedinto a plurality of texture pattern memories and a plurality of pixelsare simultaneously read out by a digital signal processor or the likeprovided for every memory and are drawn. With this method, a highprocessing speed can be accomplished.

FIG. 1 is a schematic diagram showing a conventional texture mappingmechanism. Texture pattern memories 64-1 and 64-2 are individuallyprovided for drawing processing units 32-1 and 32-2 provided in a3-dimensional drawing mechanism 22. The same texture pattern is storedinto the memories 64-1 and 64-2. The drawing processing units 32-1 and32-2 read out two texture pixel data (color values) in parallel from thetexture pattern memories 64-1 and 64-2 by using ST texture coordinates(s₁, t₁) and (s₂, t₂) obtained by the coordinates transformation and setthe read-out texture pixel data into registers 68-1 and 68-2. Twotexture pixel data in the registers 68-1 and 68-2 are simultaneouslywritten into a frame memory 34 by the address designation by the XYdisplay coordinate values (x, y). The mapping data of the texturepattern drawn in the frame memory 34 is read out by the addressdesignation by the XY display coordinate values (x, y) and is displayedon a color display 28.

The texture coordinate values (s, t) in the texture pattern memory canbe read out by an amount of only one pixel by a single access becauseaddresses are discontinuously formed in dependence on a adhering methodof the texture pattern. The frame memory, however, can draw a pluralityof pixels at a time since drawing addresses (x, y) are continuous.

In the example of FIG. 1, two sets of digital signal processors andtexture pattern memories are provided and image signals are processed inparallel every two pixels at a time. However, actually, about 8 to 64sets of digital signal processors and texture pattern memories areprovided and the parallel processes are executed.

In such a conventional texture mapping mechanism, however, a memorycapacity increases in correspondence to the parallel processes. When amemory capacity is limited, therefore, a storage amount of patterns isalso limited. Consequently, as the number of kinds of texture patternsincreases, it is necessary to process the texture patterns whileexchanging them.

In many cases, however, the texture patterns are stored in an externalmagnetic disk apparatus or the like. A very long time is needed toexchange the patterns as compared with the time which is necessary forthe drawing process. There is a problem such that when an amount oftexture patterns once reaches an amount such that it is necessary toexchange the patterns, the drawing speed suddenly fairly becomes slow.

In such a conventional texture mapping mechanism, on the other hand, noproblem occurs in the case where the texture pixel data read out fromthe texture pattern memory is used and mapped to the XY displaycoordinates in the frame memory by a size of about (1:1). In case ofenlarging a figure and drawing in the frame memory, however, there is aproblem such that the texture pattern is drawn like a block and isunnaturally seen.

The above problems will now specifically be described with reference toFIGS. 2A to 2C. First, as shown in FIG. 2A, as for the texture pattern,for example, (8×8) pixels are set to one unit and the pixel data storedat each coordinate position, namely, the color value is convenientlyexpressed by "⊚ x .increment. ▪". FIG. 2B shows the case of drawing at arate of (1:1). FIG. 2C shows the case of enlarging and drawing at a rateof (1:4).

In case of drawing at a rate of (1:1) as shown in FIG. 2B, four kinds ofcolors are mixed and an image is seen as if it were painted in a certaincolor when it is seen from a far position. The actual pixel on a displaycorresponds to a micropoint. The mapped texture pattern shown in thediagram is actually seen as a square of about 5 mm. However, as shown inFIG. 2C, in case of enlarging and drawing at a rate of about (1:4),since one texture pixel is magnified to (4×4)=16 pixels, even when it isseen from a far position, it is seen as a block-like rough pattern.

To solve the above problem, hitherto, in case of extremely magnifying, atexture pattern which has previously been magnified is separatelyprepared and used, thereby preventing that a block-like pattern appears.On the other hand, texture pixel data of the pixels which are arrangedupon enlargement is obtained by a linear interpolation of theneighboring texture image data (color values) before enlargement. Thecolor of the pixels arranged for enlargement is smoothly changed,thereby preventing that a block-like shape is seen. To prepare theenlarged texture patterns, however, a texture pattern memory of a largecapacity is needed. There are also problems such that it takes a longcalculating time to interpolate the color information of the pixel dataof the number according to the magnification upon enlargement and thatthe drawing speed remarkably becomes slow.

On the other hand, the texture pattern memory 34 must be accessed by adrawing control mechanism 18 every interpolating calculation. There are,consequently, problems such that it takes a time to execute the linearinterpolating calculation using the UV surface shape coordinates and STtexture coordinates and the mapping processing speed of the texturepattern is remarkably slower than that in case of a simple plainpainting.

In the conventional drawing arithmetic operating mechanism, aperformance such that a solid object is divided into a number ofpolygons and is expressed as a set of polygons and the polygons aredrawn at a high speed is required.

The polygon is provided as 3-dimensional figure data including3-dimensional coordinates (x, y, z) indicative of the position of eachvertex of, for example, a triangle and color values of the vertexes. The3-dimensional drawing mechanism develops such polygon vertex informationto a set of pixels which are drawn into the frame memory. However, withrespect to the polygon which were developed to the pixels, the colorvalues of only the vertex pixels have been decided. Therefore, withrespect to the color values of the pixels other than the pixels of thevertexes, the color values calculated by the linear interpolation areused and the pixels are drawn, so that the solid object can be moresmoothly expressed.

In the actual calculations to obtain the color value of each pixel bythe linear interpolation, a difference between the color value of thestart pixel of the scan line which passes through the polygon and thecolor value of the end pixel is divided by the number of pixels existingbetween the start point and the end point and a change value per onepixel is obtained. After that, it is sufficient to add the change valueto the preceding color value by an adder each time the pixel position isincreased from the designated position.

However, since the change value which is used for interpolatingcalculation has a value below a decimal point, there are problems suchthat when the pixel position is increased to the final pixel positionwhose color value has previously been known, the adder causes anoverflow or underflow, the color value changes to quite the differentcolor value, and a color which is largely deviated from the inherentcolor is outputted.

Further, the conventional 3-dimensional graphics drawing apparatus has ahidden image erasing function using a Z buffer when a plurality ofimages are synthesized. That is, a depth coordinate value (z) of theimage having the 3-dimensional coordinates (x, y, z) drawn in aplurality of frame buffers is used. Among the pixel data of a pluralityof images existing at the same position, the pixel data of the imageexisting on this side is set to the effective data and the synthesizedimage is drawn.

The 3-dimensional frame buffer is constructed by a 2-dimensional framebuffer into which RGB pixel data is written by the address designated bythe XY display coordinate values (x, y) and a Z buffer into which thedepth coordinate value (z) corresponding to each pixel is likewisewritten by the address designation by the XY display coordinate values(x, y). A plurality of 3-dimensional frame buffers are provided tosynthesize images.

An image synthesizing method in the 3-dimensional graphics apparatus isoften used in a simulation or the like in which a plurality of objectsmove in front of a background image. An image in which a complicatedbackground has previously been completed is prepared as a pattern and istransferred in accordance with a situation and is drawn and used. Inthis case, a 2-dimensional image such that all of the depth coordinatevalues (z) are set to the same value is prepared with respect to thebackground image. In the conventional apparatus, however, even when allof the depth coordinate values (z) are the same on the whole pictureplane, they are written into the Z buffer every all of the pixels andthe Z buffer of a large capacity is not effectively used.

Further, an expensive graphics workstation is used for a 3-dimensionaldisplay of a CAD of the machine system or a CAD of the architecturesystem. However, in association with the realization of a low price of aworkstation, a using method whereby the result of the design can beconfirmed as a 3-dimensional image even if a processing speed is slow isrequested. A 3-dimensional graphics drawing apparatus of a low pricewhich meets the low-price workstation is demanded.

In the conventional 3-dimensional graphics drawing apparatus installedin the workstation, however, since it has the Z buffer memory to storethe depth coordinate value (z), as compared with a 2-dimensional drawingapparatus, the memory capacity increases and the costs rise since the Zbuffer memory is additionally used.

To solve such a problem, it is considered that the Z buffer memory isprovided in a main storage unit of the CPU. When the Z buffer memory isprovided in the main storage unit of the CPU, however, the Z buffermemory is accessed via the bus of the CPU, so that an accessing speedbecomes slow and the drawing performance is deteriorated.

SUMMARY OF THE INVENTION

According to the present invention, there is provided a 3-dimensionalgraphics drawing apparatus in which in the case where a high-speeddrawing by texture mapping is needed, a degree of parallel constructionis increased, and in the case where the operator wants to handle manytexture patterns, a degree of parallel construction is reduced, therebyenabling a texture pattern memory to be efficiently used.

A texture mapping mechanism of the present invention has: a texturepattern memory in which a texture pattern consisting of a set of texturepixel data has been stored in the address which is designated by thecoordinate values (s, t) of 2-dimensional ST texture coordinates and aframe memory which has 2-dimensional XY display coordinatescorresponding to the display screen and in which a 2-dimensional imageof a surface shape of a 3-dimensional object drawn by the texture pixeldata is stored.

The invention also has a drawing arithmetic operating mechanism which isconstructed in a manner such that coordinate values (u, v) of a2-dimensional UV surface shape to which the surface shape in the casewhere a texture pattern is adhered to a 3-dimensional object defined bya set of polygons is projected are produced, the coordinate values (u,v) of the UV surface shape are converted into coordinate values (s, t)of ST texture coordinates in a texture pattern memory, correspondingtexture pixel data is read out, and 2-dimensional coordinates (x, y) fordisplay corresponding to the coordinate values (u, v) of the UV surfaceshape are designated and written into the frame memory.

With respect to such a texture mapping mechanism, according to thepresent invention, a plurality of sets of texture pattern memory anddrawing arithmetic operating mechanism are provided, and a parallelprocessing mode and a time-division processing mode can be switched.

In the parallel processing mode, there is executed a high-speed parallelmapping such that the same texture pattern is stored into a plurality oftexture pattern memories and the texture pixel data at differentcoordinate positions is read out from the self texture pattern memoryand is simultaneously written into the frame memory by a single accessby a plurality of mapping drawing mechanism of each set.

In the time-division processing mode, there is executed a time-divisionmapping such that different kinds of texture patterns are stored into aplurality of texture pattern memories, either one of the plurality oftexture pattern memories is selected, and the texture pixel data issequentially read out and written into the frame memory by the drawingarithmetic operating mechanism of each set.

In the time-division mapping, in the case where a change in texturepattern is instructed, it is sufficient to merely select another texturepattern memory in which the instructed texture pattern has already beenstored. Therefore, there is no need to exchange the texture pattern froman external hard disc or the like. Even when the texture pattern isexchanged during the process, the drawing speed is not so largelydecreased.

As mentioned above, by executing the parallel processes such that thesame pattern is stored into a plurality of texture pattern memories andis simultaneously mapped by a plurality of drawing arithmetic operatingmechanisms, the drawing operations can be performed at a high speed. Onthe other hand, in case of the time-division processes such thatdifferent patterns are stored into a plurality of texture patternmemories and either one of them is selected and the same memory issequentially accessed by a plurality of drawing arithmetic operatingmechanisms in a time-divisional manner and the drawing operation isexecuted, although the drawing speed is slow, there is no need toexchange the texture pattern from the outside, and the image can bedrawn at an extremely higher speed than that in case of exchanging thepattern.

According to the invention, there is provided a 3-dimensional graphicsdrawing apparatus in which even when a texture pattern is enlarged anddrawn, a block noise can be made inconspicuous by a simple process.

According to a texture mapping mechanism of the present invention, onthe basis of the vertex coordinate values (u, v) of a polygonconstructing the surface shape in the case where a 2-dimensional texturepattern is adhered to a 3-dimensional object defined by a set ofpolygons and the vertex coordinate values (s, t) of the ST texturecoordinates corresponding to the vertex coordinate values (u, v),initial values (s₀, t₀) which are used in the coordinate conversion fromthe UV surface shape coordinates to the ST texture coordinates andincreased amount values (K₁, K₂) are produced and supplied to thedrawing arithmetic operating mechanism, thereby converting into theaddress coordinates for texture access.

A calculating section of texture S coordinates includes: an S coordinateregister to hold an S coordinate initial value (s₀) of the ST texturecoordinates; an S coordinate increased amount register to hold the Scoordinates increased amount value (K₁) of the ST texture coordinates;and an S coordinate adder for adding the S coordinate initial value (s₀)and the S coordinate increased amount value (K₁) each time the UVsurface shape coordinate value (u) between the vertexes of the polygonis inputted and for allowing the result of the addition to be held intothe S coordinate register as new S coordinate values.

A calculating section of the texture T coordinates includes: a Tcoordinate register to hold a T coordinate initial value (t₀) of the STtexture coordinates; a T coordinate increased amount register to hold aT coordinate increased amount value (K₂) of the ST texture coordinates;and a T coordinate adder for adding the T coordinate initial value (t₀)and the T coordinate increased amount value (K₂) each time the UVsurface shape coordinate value (v) between the vertexes of a polygon isinputted and for allowing the result of the addition to be held into theT coordinate register as a new T coordinate value.

With respect to such a calculating mechanism, for the purpose of thetexture mapping upon enlargement drawing, the S coordinate calculatingsection further includes: an S coordinate variation selecting circuitfor generating a variation value (.increment.s) which is designated bythe coordinate values (x, y) of the XY display coordinates correspondingto the coordinate values (u, v) of the UV surface shape coordinates whenthe enlarging mode is set; and an adding circuit for adding thevariation value (.increment.s) of the S coordinate variation selectingcircuit to the coordinate value (s) from the S coordinate register andfor supplying the result of the addition to the texture pattern memory.

Similarly, the T coordinate calculating section further includes: a Tcoordinate variation selecting circuit for generating a variation value(.increment.t) which is designated by the coordinate values (x, y) ofthe XY display coordinates corresponding to the coordinate values (u, v)of the UV surface shape coordinates when the enlaring mode is set; andan adding circuit for adding the variation value (.increment.t) of the Tcoordinate variation selecting circuit to the coordinate value T fromthe T coordinate register and for supplying the result of the additionto the texture pattern memory.

By the random additions of the variation values .increment.s and.increment.t as mentioned above, a plurality of texture pixel data(color values) which are used to enlarge and draw one pixel are read outfrom the distributed positions exceeding the enlarged rectangularregion, so that the block-like boundary becomes inconspicuous.

When setting the enlarging mode in which the coordinate values (u, v) ofthe UV surface shape coordinates are enlarged to the XY displaycoordinates at a rate of (1:N) and are drawn, the increased amountvalues (K₁, K₂) are set into 1/N and the coordinate values (s, t) of thesame ST texture coordinates are continuously generated each time thecoordinate values (u, v) of N continuous UV surface shape coordinatesare inputted.

For example, when setting the enlarging mode in which the coordinatevalues (u, v) of the UV surface shape coordinates which corresponds tothe coordinate values (s, t) of the ST texture coordinates in aone-to-one corresponding manner are enlarged four times and developedinto the XY display coordinates, the increased amount values (K₁, K₂)are set into 0.25 of 1/4 and are increased as follows.

    0.00→0.25→0.50→0.75→1.00

Since the drawing operation is executed on a pixel unit basis here, onlyan integer number of coordinate values of the ST texture coordinatesexist. Therefore, all of the coordinate values 0.00 to 0.75 are set to 0by rounding into the integer. Therefore, the texture pixel data read outfrom the position of the same ST texture coordinates is mapped to fourpixels and the pixel can be drawn in the large size of four times.

The S coordinate variation selecting circuit and the T coordinatevariation selecting circuit have the folowing tables. Namely, whensetting the enlarging mode for enlarging the coordinate values (u, v) ofthe UV surface shape coordinates to the values of N times and developingto the XY display coordinates, N kinds of variation values from 0 to(N-1)·(K₁ /N) and (N-1)·(K₂ /N) which increase every increased amountvalues of (K₁ /N) and (K₂ /N), as units, which are obtained by dividingthe increased amounts (K₁ ·K₂) into 1/N have been stored at random inthe tables at the positions which are designated by the coordinatevalues (x, y) of the XY display coordinates. Such tables are prepared inthe above selecting circuits. Upon mapping, the tables are searched bythe coordinate values (x, y) of the XY display coordinates, therebyselecting the corresponding variation values (.increment.s,.increment.t).

For example, when the enlarging mode of four times is set, four kinds ofvariation values 0.00, 0.25, 0.50, and 0.75 which increase on a unitbasis of the increased amount value of 0.25 are obtained and stored atrandom in tables at the positions which are designated by lower two bitsof the coordinate values (x, y) of the XY display coordinates, therebypreparing the tables. Upon mapping, the tables are searched by the lowertwo bits of the coordinate values (x, y) of the XY display coordinates,thereby selecting the corresponding variation values.

As mentioned above, when the texture pattern is enlarged and drawn, bydistributing the ST texture coordinates such that the variation valuesselected by the XY display coordinates which are used to write into theframe memory are added and the result of the addition is read, theblock-like boundary when the pattern is enlarged and drawn can be madeinconspicuous.

According to the present invention, as a memory device which can processthe mapping of a texture pattern at a high speed, the memory devicehaving the interpolation calculating mechanism of the coordinateconversion therein is provided. Therefore, the memory access for theinterpolating calculation by the drawing arithmetic operating mechanismbecomes unnecessary. When the UV surface coordinate values (u, v) aresupplied to the memory device, the texture pixel data which was read bythe interpolation calculated ST texture coordinate values (s, t) can beobtained.

There is also no need to provide any interpolation calculating mechanismfor the digital signal processors or the like constructing the drawingarithmetic operating mechanism. A load of the digital signal processorcan be reduced. As an interpolation calculating mechanism which is builtin the memory device, it is possible to use the same interpolationcalculating mechanism as that provided for the drawing arithmeticoperating mechanism.

Further, it is also possible to provide: an S coordinate controlregister in which the upper bits of the coordinate value s which isadded and outputted by the S coordinate adder are fixed to the upperbits of the initial value s₀ set in the S coordinate register, therebylimiting a conversion coordinate region; and a T coordinate controlregister in which the upper bits of the coordinate value t which isadded and outputted by the T coordinate adder is fixed to the upper bitsof the initial value t₀ set in the T coordinate register, therebylimiting the conversion coordinate region.

By fixing the upper bits of the output of the adder to the upper bits ofthe initial values s₀ and t₀ by the above control registers, only thelower bits of the coordinate values (s, t) change due to theinterpolating calculation and the texture pattern can be repeatedly readout while limiting to the rectangular region that is determined by thefixed upper bits.

Further, according to the invention, there is provided a 3-dimensionalgraphics drawing apparatus which can absorb errors and can accuratelyexecute interpolating calculations without raising a calculatingprecision by increasing the number of bits of an adder which is used forthe interpolating calculation.

The drawing arithmetic operating mechanism of the invention has aninterpolation arithmetic operating mechanism for arithmeticallyoperating a color value of each pixel between vertexes by a fixed bitlength by the linear interpolation on the basis of the color values oftwo vertexes of a polygon which expresses a 3-dimensional object. Theinterpolation arithmetic operating mechanism obtains the change value bydividing the difference between the pixel values of the vertexes by thenumber of pixels between two vertexes, and each time the pixel positionis increased while setting the color value of one of the two vertexes toan initial value, the change values are added by the adder and the colorvalue of each pixel is obtained.

The color value added by the adder has a value below the decimal point.Therefore, there is a case where the adder causes an overflow orunderflow at the final pixel position. When the color value of the finalpixel obtained by the adder causes an underflow, accordingly, smallerone of the color values of the pixels of two vertexes is selected as aminimum value and is fixedly generated. On the other hand, when thecolor value of the final pixel obtained by the adder overflows, largerone of the color values of the pixels of two vertexes is selected as amaximum value and is fixedly generated.

Due to this, a situation such that the color value of the pixel at thefinal position to draw the polygon is quite different from the colorvalue to be inherently calculated is eliminated. An arithmetic operatingprecision can be raised without increasing the number of bits of theadder.

According to the invention, there is provided a 3-dimensional graphicsdrawing apparatus which can effectively use a Z buffer to anotherapplication when a background image or the like in which depthcoordinate values are equal on a whole picture plane is stored into a3-dimensional frame buffer. In addition to the 2-dimensional framebuffer to draw pixel data and the Z buffer, the Z register to write asingle depth coordinate value z is provided for the 3-dimensional framebuffer. Upon drawing in the case where the depth coordinate values areequal on the whole picture plane, namely, with respect to all of thepixels as in case of a background image, the depth coordinate value (z)is written into the Z register without using the Z buffer. Therefore,the pattern can be drawn at a high speed by only a speed correspondingto that there is no need to write into the Z buffer. For example, bydeveloping another background image which will be used for the synthesisof the next picture plane into the work buffer, a switching display ofthe background image to a change in scene can be performed at a highspeed.

According to the invention, there is provided a 3-dimensional graphicsdrawing apparatus which doesn't deteriorate the drawing performance evenwhen the costs are reduced by arranging the Z buffer into the mainstorage unit. The 3-dimensional graphics drawing apparatus comprises: a3-dimensional drawing mechanism having a main bus and a local bus; a CPUto supply 3-dimensional drawing data (x, y, and z pixel coordinates andpixel color values) to the 3-dimensional drawing mechanism through themain bus; a main storage control unit to which an access from the CPU bythe main bus and an access from the 3-dimensional drawing mechanism bythe local bus are selectively performed; and a main storage unit inwhich in addition to information that is handled by the CPU, drawinginformation which is handled by the 3-dimensional drawing mechanism isstored into a predetermined area which has previously been allocated.

The 3-dimensional drawing mechanism designates the storage area of thedrawing information allocated in the main storage unit and writes depthinformation (z value) of a 3-dimensional image on a picture plane unitbasis. When a plurality of 3-dimensional image information aresynthesized, the depth control mechanism reads out the depth informationfrom the main storage unit and compares and selects and draws the imageinformation locating on this side which is nearest.

The depth control mechanism has an address register in which the offsetaddress, for designating the head position of the memory area of thedrawing information which was allocated in the main storage device isstored as an upper address and an X address and a Y address in the framememory indicative of the drawing position that is designated by the2-dimensional display coordinates are stored as lower addresses. Themain storage unit can be directly accessed through the local bus byusing the memory addresses of the address register.

As mentioned above, even when the Z buffer is arranged on the mainstorage unit and the costs are reduced by providing the specialhigh-speed bus as a local bus between the 3-dimensional drawingmechanism and the main storage control apparatus and thereby enablingthe Z buffer area in the main storage unit to be directly accessed, thedrawing process can be performed at a high speed.

On the other hand, an offset address register to designate the startposition of the Z buffer area in the main storage unit is provided forthe depth control section of the 3-dimensional drawing mechanism,thereby enabling the Z buffer area to be set at an arbitrary position inthe main storage unit. Due to this, the use efficiency of the memory israised.

Consequently, the Z buffer memory is made unnecessary and the costs ofthe drawing mechanism can be reduced without deteriorating theperformance of the 3-dimensional drawing mechanism.

The above objects, features, and advantages of the present inventionwill become more apparent from the following detailed description withreference to the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic explanatory diagram of a conventional texturemapping mechanism;

FIG. 2A is an explanatory diagram of a storage pattern in a texturepattern memory;

FIG. 2B is a drawing explanatory diagram of a texture pattern drawn at arate of (1:1);

FIG. 2C is an explanatory diagram of a texture pattern which wasenlargedly drawn at a rate of (1:4);

FIG. 3 is an explanatory diagram showing a whole construction of thepresent invention;

FIG. 4 is a block diagram of an embodiment of a drawing arithmeticoperating mechanism in FIG. 3;

FIG. 5 is a block diagram showing the details of a digital signalprocessor in FIG. 4;

FIG. 6 is an explanatory diagram of eight parallel pipelines which arerealized by the drawing arithmetic operating mechanism in FIG. 3;

FIG. 7 is an explanatory diagram of a 5-dimensional hypercube which isrealized by the drawing arithmetic operating mechanism in FIG. 3;

FIG. 8 is an explanatory diagram of an arithmetic operating function ofthe drawing arithmetic operating mechanism in FIG. 3;

FIG. 9 is a block diagram of a 3-dimensional drawing mechanism and a2-dimensional drawing mechanism in FIG. 3;

FIG. 10 is an explanatory diagram showing a method of simultaneouslydrawing (8×16) pixels into a frame memory in the 3-dimensional drawingmechanism;

FIG. 11 is an explanatory diagram of a structure of pixel data of theinvention;

FIG. 12 is a block diagram showing a parallel processing mode in a3-dimensional drawing mechanism in FIG. 9;

FIG. 13 is a block diagram showing a time-division processing mode inthe 3-dimensional drawing mechanism in FIG. 9;

FIG. 14 is a flowchart showing mapping processes in the parallelprocessing mode and time-division processing mode in the invention;

FIG. 15 is an explanatory diagram of a texture pattern mapped in theparallel processing mode;

FIG. 16 is an explanatory diagram of a texture pattern mapped in thetime-division processing mode;

FIG. 17 is a block diagram of a texture mapping mechanism provided in adrawing processing unit in the 3-dimensional drawing mechanism;

FIG. 18 is an explanatory diagram showing the principle of the texturemapping accompanied with a coordinate transformation;

FIG. 19 is a practical explanatory diagram of the texture mappingregarding a quadrilateral polygon;

FIG. 20 is an explanatory diagram showing numerical values of thecoordinate transformation in FIG. 19 in a lump;

FIG. 21 is an explanatory diagram of polygon command data which is usedin the texture mapping;

FIG. 22 is a flowchart showing the processing operation of the texturemapping in FIG. 17;

FIG. 23 is a block diagram of a texture mapping mechanism of the presentinvention which is used for the enlarged drawing;

FIG. 24 is an explanatory diagram of S coordinatte values of a mappingpattern which change in accordance with lower two bits of the XY displaycoordinate values when a pattern is enlargedly drawn at a rate of (1:4);

FIG. 25 is an explanatory diagram of S coordinate variation values whichchange in accordance with lower two bits of the XY display coordinatevalues when a pattern is enlargedly drawn at a rate of (1:4);

FIG. 26 is an explanatory diagram showing the result of the addition ofthe S coordinate values in FIG. 24 and the S coordinate variation valuesin FIG. 25;

FIG. 27 is an explanatory diagram of T coordinate values of a mappingpattern which change in accordance with lower two bits of the XY displaycoordinate values when a pattern is enlargedly drawn at a rate of (1:4);

FIG. 28 is an explanatory diagram of T coordinate variation values whichchange in accordance with lower two bits of the XY display coordinatevalues when a pattern is enlargedly drawn at a rate of (1:4);

FIG. 29 is an explanatory diagram showing the result of the addition ofthe T coordinate values in FIG. 27 and the T coordinate variation valuesin FIG. 28;

FIG. 30 is an explanatory diagram showing the orders of tablearrangement of the variation values in FIGS. 25 and 28;

FIG. 31 is an explanatory diagram of a texture pattern drawn at a rateof (1:4) without adding the variation values;

FIG. 32 is an explanatory diagram of a texture pattern drawn at a rateof (1:4) by adding the variation values;

FIG. 33 is an explanatory diagram of S coordinate values of a mappingpattern which change in accordance with lower three bits of the XYdisplay coordinate values when a pattern is enlargedly drawn at a rateof (1:8);

FIG. 34 is an explanatory diagram of S coordinate variation values whichchange in accordance with lower three bits of the XY display coordinatevalues when a pattern is enlargedly drawn at a rate of (1:8);

FIG. 35 is an explanatory diagram showing the result of the addition ofthe S coordinate values in FIG. 33 and the S coordinate variation valuesin FIG. 34;

FIG. 36 is an explanatory diagram of T coordinate values of a mappingpattern which change in accordance with lower three bits of the XYdisplay coordinate values when a pattern is enlargedly drawn at a rateof (1:8);

FIG. 37 is an explanatory diagram of T coordinate variation values whichchange in accordance with lower three bits of the XY display coordinatevalues when a pattern is enlargedly drawn at a rate of (1:8);

FIG. 38 is an explanatory diagram showing the result of the addition ofthe T coordinate values in FIG. 36 and the T coordinate variation valuesin FIG. 37;

FIG. 39 is an explanatory diagram showing the orders of the tablearrangement of the variation values which are used when a pattern isenlargedly drawn at a rate of (1:8);

FIG. 40 is an explanatory diagram of a texture pattern drawn at a rateof (1:8) without adding the variation values;

FIG. 41 is an explanatory diagram of a texture pattern drawn at a rateof (1:8) by adding the variation values;

FIG. 42 is a block diagram showing the first embodiment of a texturepattern memory having an interpolation calculating mechanism therein;

FIG. 43 is a block diagram showing the second embodiment of a texturepattern memory having an interpolation calculating mechanism therein;

FIG. 44 is an explanatory diagram showing an access range of ST texturecoordinates in the second embodiment of FIG. 43;

FIG. 45 is a block diagram showing an embodiment of an interpolationcalculating mechanism of color values according to the presentinvention;

FIGS. 46A to 46C are explanatory diagrams showing the practicalcalculating operations of the interpolation calculating mechanism inFIG. 45;

FIG. 47 is a block diagram showing the details of a 3-dimensionaldrawing mechanism of the present invention having a Z register;

FIG. 48 is an explanatory diagram showing a processing function of animage synthesis in FIG. 47;

FIG. 49 is a block diagram of an embodiment in which a Z buffer isarranged in a main storage unit;

FIG. 50 is a block diagram showing the details of FIG. 49; and

FIG. 51 is a block diagram showing another embodiment in which a Zbuffer is arranged in the main storage unit.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT SYSTEM CONSTRUCTION

FIG. 3 is a block diagram showing a construction of one unit of a3-dimensional graphics drawing apparatus of the present invention. Aplurality of such units are provided as necessary. A CPU 11 and a mainstorage unit (MSU) 12 are provided in a whole control section 10. Thewhole control section 10 is connected to a host computer through a hostadapter 14. A drawing command and figure data indicative of a3-dimensional object are supplied from the host computer to the wholecontrol section 10 through the host adapter 14. The CPU 11 of the wholecontrol section 10 executes the management of the drawing data and thewindow control on the basis of host commands. It is desirable to providetwo CPU 11 in order to realize the drawing management and the windowcontrol by parallel processes.

Subsequent to the whole control section 10, a drawing operatingmechanism 18 is provided through a data input section 13. In theembodiment, the drawing operating mechanism 18 has 32 digital signalprocessors therein and receives data by the data input section using theFIFO (First-in First-out) coupling and constructs 8-parallel pipelinesor a 5-dimensional hypercube by the mutual communicating functions whichthe digital signal processors have, thereby executing arithmeticoperating processes in parallel. As drawing arithmetic operations of thedrawing operating mechanism 18, calculations of the coordinatetransformation of the coordinates of the vertexes of a polygon given as3-dimensional data and calculations to decide the color values of thevertex pixels are executed. The result of the drawing operatingmechanism 18 is sent to the 3-dimensional drawing mechanism 22 through aparallel data distributing mechanism 20. The parallel data distributingmechanism 20 efficiently distributes the asynchronous data produced bythe 8-parallel pipelines of the drawing operating mechanism 18 to the3-dimensional drawing mechanism 22 at the next stage. Specificallyspeaking, the FIFO coupling is used.

The 3-dimensional drawing mechanism 22 receives the 3-dimensional imagedata which was developed to the vertex pixels of the polygon from thedrawing operating mechanism 18 and obtains the pixels to bury theportion between the vertexes of the polygon by interpolatingcalculations. Further, the blending, mapping, hidden image erasure, andthe like of each pixel are executed by the firmware and a pattern isdrawn in a 3-dimensional frame memory. The data drawn in the3-dimensional frame memory of the 3-dimensional drawing mechanism 22 isautomatically transferred to a 2-dimensional drawing mechanism 26through a depth data control mechanism 24 and displayed as 2-dimensionalimage data by the color display 28.

Further, the drawing operating mechanism 18, 3-dimensional drawingmechanism 22, and 2-dimensional drawing mechanism 26 are connected tothe whole control section 10 through a system bus 16 and the drawingdata is managed by the whole control section 10. The window control ofthe 2-dimensional drawing mechanism 26 is directly performed by thewhole control section 10. A hard disc 30 is connected to the system bus16. For example, a plurality of kinds of texture patterns which are usedfor texture mapping of the drawing operating mechanism 18 havepreviously been stored on the hard disc 30. A necessary texture patternis read out from the hard disc 30 under control by the whole controlsection 10 and can be stored into a texture pattern memory using a partof the frame memory of the 3-dimensional drawing mechanism 22. In amanner similar to the above, the mapping data other than the texturemapping is also transferred from the hard disc 30 to the frame memory ofthe 3-dimensional drawing mechanism 22 and can be used for the drawingarithmetic operation.

FIG. 4 is a block diagram of an embodiment of the drawing operatingmechanism 18 in FIG. 3. In FIG. 4, the drawing operating mechanism uses32 digital signal processors 60-1 to 60-32 and construct eight pipelines42-1 to 42-8 each having a 4-stage construction as shown in the diagramand executes high-speed drawing arithmetic operations. As typicallyshown with respect to the pipeline 42-1, the pipeline structure has fourdigital signal processors 60-1, 60-9, 60-17, and 60-25. The firstdigital signal processor (DSP) 60-1 executes the coordinatetransformation of the polygon vertexes and the development to the pixeldata to obtain the color values of te polygon vertexes with respect to3-dimensional figure data expressed by a set of polygons. The coordinatetransforming calculation to the texture coordinates for texture mappingis included in the coordinate transformation of the polygon vertex. Thedigital signal processor 60-9 at the second stage executes a shadowmapping using a shadow map which has previously been formed by setting avisual point to a light source. The digital signal processor 60-17 atthe third stage executes a bump mapping using a bump map of eight bitsor twenty-four bits per one pixel. Further, the digital signal processor60-25 at the fourth stage executes a reflection mapping using threekinds of reflection maps of the semispherical type, full spherical type,and cubic type.

For example, a processor TM320C40 of TI Co., Ltd. can be used as adigital signal processor which is used for the pipelines 42-1 to 42-8.As shown in FIG. 5, such a digital signal processor has a CPU 200, aprogram memory 202 using an SRAM, a data memory 204 using a DRAM of 4Mbytes, and a communication channel 206 of six channels having acommunicating function with a direct memory access (DMA).

Further, the digital signal processor has a local bus 44 and a grobalbuss 45 which can independently be accessed. As shown in the pipeline42-1 in FIG. 4, the local bus 44 is used to distribute and transfer the3-dimensional figure data to the digital signal processor at each stagefrom the whole control section 10. On the other hand, the global bus 45is used to transfer the result of the arithmetic operation of thedigital signal processor at each stage. Further, the 32 digital signalprocessors can be coupled by a 5-dimensional hypercube by using fivechannels in the communication channel 206 shown in FIG. 5.

FIG. 6 is a schematic diagram showing the 8-parallel pipelines 42-1 to42-8 which are realized by the drawing operating mechanism in FIG. 4.Black dots indicate thirty-two digital signal processors. FIG. 7 is aschematic diagram showing a 5-dimensional hypercube which is used forthe full point communication among all of the digital signal processorsby using the communication chanels of the digital signal processors.

FIG. 8 is an explanatory diagram showing a parallel arithmetic operatingfunction in the drawing operating mechanism in FIG. 4 and 32 digitalsignal processors are shown as processor kernels P. FIG. 8 shows a statein which the processor kernels are simultaneously coupled by theparallel pipelines in FIG. 6 and the 5-dimensional hypercube network inFIG. 7. In the drawing arithmetic operation in FIG. 8, a 3-dimensionalmodel as a drawing target provided from the host computer is interpretedby a traverser which is executed by the whole control section 10 and issent to the drawing operating mechanism 18 by designating the pipeline.The data input section 13 selectively inputs data in accordance with thedesignation of the pipeline and supplies to each pipeline of the drawingoperating mechanism 18.

In each pipeline, the processes for the coordinate transformation ofeach polygon vertex, geometrical coordinate transformation such asclipping, writing, or the like, and calculation of spin parameters todecide the color value of the vertex pixel are executed and the resultis sent to the data distributing mechanism 20. The data distributingmechanism 20 executes a distributing process to the 3-dimensionaldrawing mechanism which is constructed in correspondence to the spanaccording to the Y coordinate value of the result of the arithmeticoperation.

FIG. 9 shows the 3-dimensional drawing mechanism 22 in FIG. 3 comprisingdrawing processing units 32-1 to 32-8 and the frame memory 34. Thedrawing processing units 32-1 to 32-8 execute in parallel theinterpolating calculations to interpolate the portion between the vertexpixels on the basis of the vertex pixel data of the polygon which issent from the data distributing mechanism 20. Memory areas of aplurality of picture planes are prepared in the frame memory 34. Forexample, two memory areas are prepared for RGB pixel data. Two memoryareas are prepared for the Z buffer. Eight memory areas are prepared forstorage of the texture pattern. The pixel data interpolated by thedrawing processing units 32-1 to 32-8 is drawn in the frame memory 34 bythe address designation of the display coordinate values (x, y). At thesame time, the depth coordinate value z of each pixel is stored into theframe memory 34. As shown in FIG. 10, the drawing processing units 32-1to 32-8 execute the simultaneous drawing operations of 128 pixel data bysimultaneously accessing arbitrary positions in (16×8) rectangularregions 48-1 to 48-n in the 3-dimensional frame memory 34. The blending,various kinds of mappings such as texture mapping and the like, hiddenimage erasure, and the like are included in the drawing of the framememory 34 by the drawing processing units 32-1 to 32-8. Those processesare executed at a high speed by parallel processes.

FIG. 11 shows a data structure of pixel data 50 which is drawn in theframe memory 34 in FIG. 10. For example, each of the RGB components isexpressed by four bits, thereby enabling 4096 colors of the RGB space tobe expressed. Further, a transparent degree α, for instance, is providedas additional information. The depth coordinate value z has been storedin a Z buffer provided separately.

Referring again to FIG. 9, the 3-dimensional image data drawn in the3-dimensional frame memory 34 of the 3-dimensional drawing mechanism 22is transferred to the 2-dimensional drawing mechanism 26 at a displayframe rate of the color display 28. The 2-dimensional drawing mechanism26 has: a transfer buffer 36 to store the image data transferred fromthe 3-dimensional drawing mechanism 22; and a display frame memory 38for allowing the frame content to be displayed by the color display 28through a display control section 40. Further, with respect to thewindow control, the image data is directly drawn into the display framememory 38 via the system bus 16 without passing through the drawingoperating mechanism.

By such a construction, the 3-dimensional drawing mechanism 22 functionsas a mechanism to realize a high processing speed of the 3-dimensionaldrawing together with the drawing operating mechanism 18. It is possibleto minimize the competition with the 2-dimensional drawing mechanism 26.When the image data produced by the 3-dimensional drawing mechanism 22shown in FIG. 3 is synthesized to the image data from another unit andthe synthesized data is transferred to the 2-dimensional drawingmechanism 26, the depth data control mechanism 24 executes a merge basedon the depth coordinate value (z).

PARALLEL PROCESS AND TIME-DIVISION PROCESS OF TEXTURE MAPPING

FIG. 12 shows the parallel process which is used in the mapping of thetexture pattern that is executed in the 3-dimensional drawing mechanism22 in FIG. 9. In the 3-dimensional drawing mechanism 22, the drawingprocessing units 32-1 to 32-8 have self texture pattern memories 64-1 to64-8 through a switching circuit 62. The frame memory 34 is used astexture pattern memories 64-1 to 64-8 and, for example, memory areas ofeight areas prepared for storage of a texture pattern are used. Thetexture pixel data read out from the texture pattern memories 64-1 to64-8 are transferred to registers 68-1 to 68-8 through a switchingcircuit 66, respectively. Further, the registers 68-1 to 68-8 functionas output registers for the frame memory for RGB in the frame memory 34shown in FIG. 9. The texture image data stored in the register 68-1 isdrawn in parallel in the frame memory 34.

In FIG. 12, broken lines indicate paths of the switching circuits 62 and66 in the case where the same texture pattern is stored in all of thetexture pattern memories 64-1 to 64-8 and the texture mapping processesare executed in parallel. That is, on the basis of the texturecoordinate data (s, t) of the polygon vertex which was converted intothe texture coordinates by dividing into eight pipelines by the drawingoperating mechanism 18, the drawing processing units 32-1 to 32-8 readout the texture pixel data of the vertexes from the texture patternmemories 64-1 to 64-8 and, subsequently, the texture pixel data to burythe portion in the polygon is obtained by interpolating calculations.

The eight drawing processing units 32-1 to 32-8 correspond to eightlines in the X-axis direction in, for example, the batch drawing region48-1 in the frame memory 34 shown in FIG. 10. Therefore, the drawingprocessing units 32-1 to 32-8 read out in a lump the texture pixel datato be written to the Y coordinate values indicative of eight lines inthe direction of the X axis from the texture pattern memories 64-1 to64-8. The drawing processing units 32-1 to 32-8 transfer the read-outdata to the registers 68-1 to 68-8 and, thereafter, supply to the RGBframe memory in the frame memory 34 and is written in a lump at a timepoint when the texture image data of (8×16) pixels are obtained. In theparallel process shown in FIG. 12, the high-speed texture mapping can berealized because the pixel data is simultaneously drawn with respect toeight lines by the texture mapping.

FIG. 13 shows a texture mapping by the time-division process. First, thetime-division process is used in case of drawing into one frame memory34 while switching the texture pattern. Therefore, necessary kinds ofdifferent texture patterns are previously stored into the texturepattern memories 64-1 to 64-8. In FIG. 13, broken lines indicate thecase where the switching circuits 62 and 66 select the texture patternin the texture pattern memory 64-1 and the data is drawn. That is, thedrawing processing units 32-1 to 32-8 receive the texture coordinatedata (s, t) indicative of the polygon vertexes supplied from thehigher-order apparatus and interpolates the texture coordinate datawhich buries the portion between the vertexes. The switching circuit 62first couples a read access from the image processing unit 32-1 to thetexture pattern memory 64-1 and transfers the read-out texture pixeldata to the register 68-1 by the switching circuit 66. Subsequently, theswitching circuit 62 couples the read access of the drawing processingunit 32-2 to the same texture pattern memory 64-1 and transfers theread-out texture pixel data to the register 68-2 by the switchingcircuit 66. In a manner similar to the above, the read access isexecuted to the texture pattern memory 64-1 in accordance with the orderof the drawing processing units 32-3 to 32-8 and the texture pixel datais transferred to the registers 68-3 to 68-8. The above processes arerepeated. On the other hand, when a switching command of the texturepattern is received from the whole control section 10, the processingmode is switched to the time-division processing mode for the othertexture pattern memory instructed. In the time-division process of thetexture mapping as mentioned above, an extreme decrease in drawing speedin the case where the texture patterns are read out from an externalhard disc and exchanged upon switching of the patterns is eliminated.The pattern can be drawn at a certain processing speed while exchangingthe texture patterns.

FIG. 14 is a flowchart showing the processing operations of the parallelprocess shown in FIG. 12 and the time-division process shown in FIG. 13.In FIG. 14, when a command for texture mapping is received from thewhole control section in step S1, a check is made to see if the parallelmode has been set or not. If YES, as shown in FIG. 12, the switchingcontrol of the parallel mode is executed with respect to the switchingcircuits 62 and 66. In step S4, the parallel mapping process isrepeatedly executed until the drawing of the whole region has beencompleted in step S5.

On the other hand, in case of the time-division processing mode in stepS2, step S6 follows and either one of a plurality of texture patternmemories is selected. In step S7, as shown in FIG. 13, the mappingprocess such that the selected texture pattern memories are sequentiallyread-accessed by the drawing processing units and the pattern is drawnis executed. While the mapping process is being executed, the presenceor absence of a change in texture pattern is discriminated in step S8.When a changing command of the texture pattern is received, theprocessing routine is returned to step S6 and a new texture patternmemory is selected. The above processes are repeated until the mappingof the whole region is finished in step S9.

FIG. 15 is an explanatory diagram of a texture pattern mapped in theparallel processing mode in FIG. 12. Namely, the texture patterns eachof which is constructed by the same texture pixel data have been storedin the texture pattern memories 64-1 to 64-8. The texture pixel data atthe positions of the Y coordinate values of eight lines in the framememory 34 is read out and drawn.

FIG. 16 is an explanatory diagram of a texture pattern mapped in thetime-division processing mode in FIG. 13. Different texture patternshave been stored in the texture pattern memories 64-1 to 64-8. Thetexture pattern by the selection of the texture pattern memory 64-1 hasfirst been drawn in the frame memory 34. The texture pattern isexchanged to the pattern in the next texture pattern memory 64-2 anddrawn on the way of the drawing.

PRINCIPLE AND CONSTRUCTION OF TEXTURE MAPPING MECHANISM

FIG. 17 shows a texture mapping mechanism provided as a hardware for thedrawing processing units 32-1 to 32-8 provided for the 3-dimensionaldrawing mechanism 22 in FIG. 9. The texture mapping mechanism of thedrawing processing unit 32 in FIG. 17 comprises: a conversioncoefficient generating section 72; a control section 74; an S coordinatecalculating section 75; and a T coordinate calculating section 76. Aselector 78, an S coordinate register 80, an increased amount register82, and an adder 84 are provided for the S coordinate calculatingsection 74. An output of the adder 84 is supplied to the other inputterminal of the selector 78. The T coordinate calculating section 76 isconstructed by a selector 88, a T coordinate register 90, an increasedamount register 92, and an adder 94.

The principle of the texture mapping will now be described withreference to FIG. 18. A 3-dimensional object 98 which is given as figuredata assumes a cylindrical body and it is now assumed that thecylindrical surface is expressed by a texture pattern. Therefore, apredetermined texture pattern has previously been stored in the texturepattern memory 64 as a set of texture pixel data. First, a texturepattern 100 stored in the texture pattern memory 64 is adhered to the3-dimensional object 98. With respect to the 3-dimensional object 98 towhich the texture pattern 100 has been adhered, a 2-dimensional surfaceshape 102 in the case where it is seen as a projection image from apredetermined direction is obtained. The 2-dimensional surface shape 102is expressed by coordinate values (u, v) of the UV surface shapecoordinates. The texture pattern 100 adhered to the 3-dimensional object98 is made correspond to a set of polygon such as triangle orquadrilateral in a one-to-one corresponding manner. The process of thepolygon in the hatched portion at the left upper corner of the texturepattern 100 adhered to the 3-dimensional object 98 will now be explainedas an example. The polygon is expressed by a set of four vertexcoordinates. Therefore, the coordinate values (u, v) of each of thevertexes O, P, Q, and R of the polygon in the hatched portion of the2-dimensional surface shape 102 can be specified. The vertexes OPQR ofthe polygon of the UV surface shape coordinates correspond to thevertexes OPQR of the ST texture coordinates in the texture patternmemory 64 in a one-to-one corresponding manner. The coordinate values(u, v) of the vertexes OPQR of the polygon of the 2-dimensional surfaceshape 102 are converted into the coordinate values (s, t) of thecorresponding vertexes OPQR of the texture pattern 64. Further, withregard to the portions other than the vertexes OPQR, the coordinatevalues (s, t) are obtained by the linear interpolation. By theconversion from the UV surface shape coordinate values (u, v) to the STtexture coordinate values (s, t) of the texture pattern memory 64, thecorresponding texture image data is read out and written to thecorresponding pixel positions of the XY display coordinates of the framememory 34, so that the texture mapping can be performed. The convertingcalculation of the polygon vertexes to the texture coordinates isexecuted by the drawing operating mechanism 18 in the unit of FIG. 3.

FIG. 19 practically shows a texture mapping of a quadrilateral polygonin FIG. 18. When a texture pattern consisting of (8×8) pixels of thecoordinate values (s, t) of the ST texture coordinates is adhered to thesurface of the 3-dimensional object, the coordinate values (u, v) of theUV surface shape coordinates indicative of the 2-dimensional surfaceshape in such a case change to a set of (8×5) pixels. The coordinatevalues of the vertexes O, P, Q, and R at the coordinate values (u, v) ofthe UV surface shape coordinates and the coordinate values (s, t) of theST texture coordinates are defined as shown in the diagram. The firstrow in the U-axis direction of the UV surface shape coordinatescomprises five pixels and the first row of the coordinate values (s, t)of the ST texture coordinates comprises eight pixels. In this instance,since the vertexes O and P of both ends correspond to each other in aone-to-one corresponding manner, the S coordinate values correspondingto three pixels of u=1, 2, and 3 at the coordinate values (u, v) of theUV surface shape coordinates are obtained by linear interpolation.Similarly, when considering the corresponding relation between thevertexes O and R of the first column as the V-axis direction and T-axisdirection, the vertexes O and R correspond to each other in a one-to-onecorresponding manner. First, the increased amount value K₁ in the S-axisdirection and the increased amount value K₂ in the T-axis direction areobtained by the following equations.

    K.sub.1 =(s.sub.e -s.sub.0)/(u.sub.e -u.sub.0)             (1)

    K.sub.2 =(t.sub.e -t.sub.0)/(v.sub.e -v.sub.0)             (2)

As mentioned above, when the increased amount value K₁ in the S-axisdirection and the increased amount value K₂ in the T-axis direction areobtained, the coordinate values s and t for changes in coordinate valuesu and v can be obtained by the following equations.

    s=s.sub.0 +(u-u.sub.0)K.sub.1                              (3)

    t=t.sub.0 +(v-v.sub.0)K.sub.2                              (4)

With respect to FIG. 19, the increased amount values K₁ and K₂ in theS-axis direction and the T-axis direction are practically obtained asfollows. ##EQU1##

The values of the coordinate values (s, t) of the ST texture coordinatesfor changes in coordinate values (u, v) of the first row of the UVsurface shape coordinates in FIG. 19 are calculated as shown in a tableof FIG. 20. In FIG. 20, the calculated coordinate values (s, t) of theST texture coordinates have numerical values below decimal point.However, since the pixel data is drawn to the XY display coordinates inthe frame memory on a pixel unit basis, the coordinate values areconverted into the coordinate values (s, t) of the ST texturecoordinates corresponding to integers by omitting the figures below adecimal point. The texture pixel data of the coordinate values (s, t) ofthe ST texture coordinates obtained by the coordinate transformationhave the color values A to H. As a result, those texture color valuesare read out from the texture pattern memory by the coordinate values(s, t) and are written as shown at the first row of the XY displaycoordinates as shown in FIG. 19, thereby performing the mapping of thetexture pattern.

In FIGS. 18 and 19, the quadrilateral polygon has been used as anexample for simplicity of explanation. However, in the 3-dimensionalgraphics drawing apparatus of the invention shown in FIG. 3, atriangular polygon is used.

FIG. 21 shows polygon command data which is supplied from thehigher-order apparatus to the drawing processing unit 32 shown in FIG.17. The UV vertex coordinate values, ST vertex coordinate values, andfurther a drawing magnification N are designated on a polygon unitbasis.

FIG. 22 is a flowchart showing the processing operation of the texturemapping mechanism in FIG. 17. First, in step S1, polygon command datashown in FIG. 21 is received. In step S2, the increased amount values K₁and K₂ are calculated and held every polygon by the equations (1) and(2). In step S3, the increased amount values K₁ and K₂ and initialvalues s₀ and t₀ of the head polygon locating at the start coordinateposition of the UV surface shape coordinates are set. Practicallyspeaking, the increased amount value K₁ is set into the increased amountregister 82 of the S coordinate calculating section 74 in FIG. 17 andthe initial value s₀ is set into the S coordinate register 80. At thesame time, the increased amount value K₂ is set into the increasedamount register 92 of the T coordinate calculating section 76 and theinitial value t₀ is set into the T coordinate register 90. Subsequently,the T coordinate value t is calculated from the V coordinate value v atthat time in step S4.

For example, the initial value t₀ in the T coordinate register 90 isfirst generated as it is in FIG. 17. At the second and subsequent times,the value which is obtained by adding K₂ of the increased amountregister 92 to the initial value t₀ of the T coordinate register 90 bythe adder 94 is set into the register 90 and is generated as a newcoordinate value t. In step S5, the S coordinate value s is calculatedfrom the U coordinate value u at that time in step S5. That is, in the Scoordinate calculating section 74 in FIG. 17, the initial value s₀ ofthe S coordinate register 80 is first generated as it is. At the secondand subsequent times, the value which is obtained by adding theincreased amount value K₁ of the increased amount register 82 to thecoordinate value of the S coordinate register 80 by the adder 84 isagain set into the register 80 and is generated as a new S coordinatevalue. In step S6, the calculated ST texture coordinate values (s, t)are generated. A check is made in step S7 to see if the polygon is thenext polygon or not. In case of the same polygon, the U coordinate valueu is increased one by one in step S8. The converting calculation fromthe U coordinate value u to the S coordinate value s in step S5 isrepeated. When the processing routine advances to the next polygon afterthe process for one polygon was finished, a check is made in step S9 tosee if the U-axis line has been finished or not. If NO, the increasedamount values K₁ and K₂ are updated in step S1 with regard to the newpolygon and processes similar to those mentioned above are repeated.When the process of the U-axis line is finished in step S9, theprocessing routine advances to step S11 and the V coordinate value v isincreased by "1". A check is now made in step S12 to see if the processof the V-axis line has been finished or not. If NO, the increased amountvalues K₁ and K₂ at the new V-axis line are updated in step S13. Theprocesses from step S4 are again repeated.

ENLARGED DRAWING OF TEXTURE PATTERN

FIG. 23 shows the texture mapping mechanism of the present inventionwhich is used in the enlarged drawing. The texture mapping mechanismwhich is realized by the hardware of the drawing processing unit 32 isfundamentally the same as that in the embodiment of FIG. 17. However,with respect to the S coordinate calculating section 74, a variationincreased amount selecting circuit 104 and an adder 106 are newlyprovided. With respect to the T coordinate calculating section 76, avariation increased amount selecting circuit 110 and an adder 112 arenewly provided. Further, the coordinate values (x, y) of the XY displaycoordinates in the frame memory which are drawn by the texture mappingare supplied as selection information of the variation increased amountsto the variation increased amount selecting circuits 104 and 110 throughan enlargement control section 108. First, to enlargely draw a texturepattern at a rate of (1:N), it is sufficient to reduce the S coordinateincreased amount value K₁ and the T coordinate increased amount value K₂which are set into the increased amount registers 82 and 92 into 1/N ofthe values which are used when the data is drawn at a rate of (1:1).

For simplicity of explanation, in the case where the coordinate values(u, v) of the UV surface shape coordinates correspond to the coordinatevalues (s, t) of the texture surface shape coordinates in a one-to-onecorresponding manner, the coordinate transformation is unnecessary, sothat both of the increased amount values K₁ and K₂ in this case areequal to 1. In this instance, to enlargedly draw the texture pattern ata rate of (1:N), K₁ and K₂ are set as follows.

    K.sub.1 =K.sub.2 =1/N

In case of enlargedly drawing a texture pattern at a rate of, forexample, (1:4) by setting the increased amount values K₁ and K₂ whichare set to 1/N, respectively, K₁ =K₂ =0.25 and each of the ST coordinatevalues (s, t) to be obtained increases such that0.00→0.25→0.50→0.75→1.00→1.25 . . . . Among those values, the coordinatevalues which were rounded to integers can be used when the ST texturecoordinates are actually read out. Therefore, as for the four values of0.00 to 0.75, (0, 0) are designated as coordinate values (s, t) by theprocess to round to integers. This results in that the four same texturepixel data are arranged and mapped. In the variation increased amountselecting circuits 104 and 110, in order to prevent that the sametexture pixel data which is generated from the adders 84 and 94 isarranged by only the same number as the enlargement magnification N andare seen as a block-like pattern, the variation increased amount valuesare selected by the selecting circuits 104 and 110 and are added by theadders 106 and 112 in order to distribute the coordinate values obtainedby the adders 84 and 94. The case of enlargedly drawing a texturepattern at a rate of (1:4) will now be described as an example. Theincreased amount selecting circuits 104 and 110 select four kinds ofvalues 0.00, 0.25, 0.50, and 0.75 which change on a 0.25 unit basis bythe designation by lower two bits of the XY display coordinate values(x, y) in the frame memory.

Practically speaking, FIG. 24 shows the S coordinate values which aregenerated from the S coordinate adder 84 for changes in lower two bits00 to 11 of the XY display coordinate values (x, y). In this case, the Scoordinate values have values of 0.00 to 0.75 and the ST texturecoordinates must be integers. Therefore, all of the coordinate valueswhich are calculated by the process to round to integers are equal to 0.This means that the same texture pixel data is mapped.

FIG. 25 shows a variation increased amount storage table provided forthe variation increased amount selecting circuit 104 of the S coordinatecalculating section 74. Four kinds of variation increased amount valuesof 0.00 to 0.75 arranged at random by lower two bits of the XY displaycoordinate values (u, v) have been stored in such a table.

FIG. 26 shows the S coordinate values in which the variations were addedby the adder 106 in FIG. 23 for changes of lower two bits of the frameXY display coordinate values (x, y). In the case where the variationsare not added in FIG. 24, by adding the variation increased amounts inFIG. 25 to the coordinate values smaller than 1, the coordinate valuesof 1 or more exist as shown in FIG. 26 and a reading range of thetexture pixel data is distributed.

FIG. 27 shows the T coordinate values which are generated from the Tcoordinate adding section 94. FIG. 28 shows a variation increased amountselection table which is stored in the variation increased amountselecting circuit 110 of the T coordinate calculating section 76.Further, FIG. 29 shows the coordinate values to which the variationvalues were added and which are generated from the T coordinate addingsection 112.

FIG. 30 shows storing rules of the variation values 0.00 to 0.75 for thetables which are set into the variation increased amount selectingcircuits 104 and 110 in FIGS. 25 and 28. In FIG. 30, reference numerals0 to 3 indicate the increased amount values 0.00 to 0.75. For example,when the first row at which Y=00 will now be explained as an example,since the magnification N=4, 0 is set to the first position. Theposition is subsequently shifted to the right by only N/2, namely, only(4÷2=2) and 1 is set there. After that, the position is contrarilyreturned to the left by N/4, namely, (4/4=1) and 2 is set there. Afterthe processes of the first row as mentioned above was finished,numerical values 3, 2, 1, and 0 are sequentially set in the Y-axisdirection for the last numeral 3 of the first row. With regard to thesecond, third, and fourth rows, the sequences of the first row which isprecedent to the last numerical values 2, 1, and 0 are inserted. It isnow assumed that when the sequence reaches the right edge, it is loopedto the left edge. For example, with respect to the last numeral 2 of thesecond row, 0 is set because 0 exists before 2 from the first row. Withrespect to the position before 0, since the first row is continuous with3 at the right edge, 3 is set. Since 1 exists at the position before 3of the first row, 1 is set into the head position of the second row bythe rules shown in FIG. 30. By forming the tables of the variationincreased amounts in FIGS. 25 and 28, a proper distributing process canbe executed.

FIG. 31 shows texture mapping patterns based on rates (1:1) and (1:4) ina state of no variation. With respect to the enlarged drawing, ablock-like pattern is conspicuous.

FIG. 32 shows the case with variations with respect to the rates (1:1)and (1:4). In case of enlargedly drawing at a rate of four times, theblock boundary is broken and distributed by the addition of thevariation increased amount values, so that the pattern can be madeinconspicuous as a block when it is seen from far away.

FIG. 33 shows the S coordinate values without a variation in case ofsetting the enlarging rate to (1:8). FIG. 34 shows a table of the Scoordinate variation values which is used for enlargement drawing of(1:4). FIG. 35 shows the S coordinate values in which the values ofFIGS. 33 and 34 were added. FIGS. 36, 37, and 38 show the T coordinatevalues without a variation in the enlarged drawing of (1:8), a variationtable, and T coordinate values after variation values were added,respectively.

FIG. 40 shows a texture pattern which was enlargedly drawn at a rate of(1:8) without any variation and a block-like boundary each comprising(8×8) pixels is conspicuous. FIG. 41 shows a texture pattern to which avariation value was added at an enlargement rate of (1:8). The boundaryof the block is almost completely broken and even when the pattern isenlargedly drawn, it is not recognized as a block noise and theenlargement drawing of a smooth texture pattern can be realized.

In FIG. 23, when a proper texture pattern which is used for texturemapping is written into a texture pattern memory 64, the increasedamount value K₁ of the increased amount register 82 of the S coordinatecalculating section 74 is set to K₁ =1 and the increased amount value Kof the increased amount register 92 of the T coordinate calculatingsection 76 is set to K₂ =0. Further, all of the variation increasedamount values of the variation increased amount selecting circuits 104and 110 are set to 0. Due to this, the texture pixel data transferredfrom an external hard disc or the like can be written to one line in theS-axis direction in the texture pattern memory 64. After completion ofthe writing of the data of one line in the S-axis direction, the valueof the T coordinate register 90 is increased by "1". The position isshifted to the next line of the S axis. The value of the S coordinateregister 80 is returned to the initial value. A start point of the nextline is set. The texture pixel data is similarly written in thedirection of the S-axis line.

The above embodiment has been described with respect to the cases ofenlargedly drawing at the rates of (1:4) and (1:8) as examples. Theenlargement rate, however, can be properly set in accordance with thenecessity.

For simplicity of explanation, the embodiment has been described as anexample with regard to the case where there is no need to perform thecoordinate transformation such that the coordinate values (u, v) of theUV surface shape coordinates correspond to the coordinate values (s, t)of the ST texture coordinates in a one-to-one corresponding manner.However, the invention can be also substantially similarly applied tothe case where the coordinate transformation such that the increasedamount values K_(l) and K₂ have values of 1 or more is needed.

Further, the above embodiment has been described as an example withrespect to the case where the texture mapping mechanism is realized bythe digital signal processors. However, the texture mapping mechanismcan be also constructed by a special hardware or a part of processes canbe also realized by a software by programs.

Moreover, the above embodiment has been described as an example withrespect to the case of realizing the drawing operating mechanism byparallel processes of the pipeline construction. However, as for thevariation process when the enlarged drawing shown in FIG. 23 isexecuted, it can be applied as it is to the texture mapping by a singledigital signal processor or MPU.

MEMORY DEVICE HAVING INTERPOLATION OPERATING MECHANISM THEREIN

FIG. 42 shows the first embodiment of a texture pattern memory havingtherein an interpolation operating mechanism which is used in the3-dimensional drawing mechanism 22 in FIG. 3. The S coordinatecalculating section 74, T coordinate calculating section 76, and amemory section 210 are provided in a texture pattern memory 208. The Scoordinate calculating section 74 is constructed by the selector 78, Scoordinate register 80, increased amount register 82, and adder 84. Anoutput of the adder 86 is supplied to the other input terminal of theselector 78. The T coordinate calculating section 76 is constructed bythe selector 88, T coordinate register 90, increased amount register 92,and adder 94. The operations of the S coordinate calculating section 74and T coordinate calculating section 76 which construct theinterpolation calculating mechanism are substantially the same as thosein the embodiment in which the interpolation calculating mechanism isprovided for the drawing processing unit 32 in FIG. 17 except that theincreased amount values K₁ and K₂ and the initial values s₀ and t₀ aresupplied from the external drawing processing unit 32.

FIG. 43 shows the second embodiment of the memory device having thereinthe interpolation operating mechanism. In the texture pattern memory 208in FIG. 42, in case of continuously mapping one texture pattern, thecoordinate values (s, t) of the S coordinate register 80 and Tcoordinate register 90 are allowed to overflow and are returned to theorigin (0, 0), thereby enabling the texture pattern to be continuouslymapped. In the case where the memory area is divided and a plurality oftexture patterns are stored into the divided small memory areas,however, since they enter the neighboring texture patterns, so that thesame pattern cannot be continuously read out. In the second embodimentof FIG. 43, the area in the memory section 210 built in the texturepattern memory 208 is divided, thereby enabling the texture patternsstored in the divided areas to be repeatedly read out. For this purpose,control registers 212 and 214 are newly provided. In the controlregister 212, upper bits of the S coordinate values which are added andoutputted by the S coordinate adder 84 are fixed to the values which aredetermined in the divided areas and only lower bits are changed.Specifically speaking, upper bits of the initial value s₀ which is setinto the S register 80 are held and uper bits of the addition output ofthe coordinate adder 84 are fixed to the values of the upper bits held.

In the control register 214, upper bits of the T coordinate values whichare added and outputted by the T coordinate adder 94 are fixed to thevalues which are determined by the divided areas and only lower bits arechanged. Practically speaking, upper bits of the initial value t₀ whichis set into the T register 90 are held and upper bits of the additionoutput of the coordinate adder 84 are fixed to the value of the upperbits held. By fixing the upper bits of the addition outputs of the Scoordinate adder 84 and T coordinate adder 94 by the control registers212 and 214 as mentioned above, the coordinate values (s, t) in whichthe upper bits are fixed and only lower bits are changed are calculatedin response to the changes in input coordinate values (u, v) of the UVsurface shape. The texture pattern stored in the area of the ST texturecoordinates which are determined by the fixed upper bits can berepeatedly read out. For example, when it is now assumed that the numberof divided areas in the S-axis direction is set to m and the number ofdivided areas in the T-axis direction is set to n, it is sufficient thatupper bits of the S coordinate value of m/2 bits are fixed and upperbits of the T coordinate values of n/2 bits are fixed. The number ofdivided areas of the memory area in the above case is equal to (m+n).For example, in case of dividing the memory area into four areas bydividing the memory area into 1/2 in each of the S-axis and T-axisdirections=, namely, by setting m=n=2, the most significant bit isfixed. On the other hand, in case of dividing the memory area into eightareas by setting m=n=4, upper two bits are fixed.

FIG. 44 relates to the case of dividing the memory area into four areasby setting m=n=2 in the S-axis and T-axis directions. Either one of fourareas A₀₀, A₁₀, A₀₁, and A₁₁ is selected in accordance with acombination of the most significant bits of the S and T coordinatevalues. The pattern can be continuously read out from the selected area.For example, it is now assumed that the initial value s₀ =000000 is setinto the S coordinate register 80, the increased amount value K₁=00100000 is set into the S increased amount register 82, the initialvalue t₀ =00000000 is set into the T coordinate register 90, and theincreased amount value K₂ =00100000 is set into the increased amountvalue register 92, respectively. Further, it is now assumed that themost significant bits in the control registers 212 and 214 are fixed to0. In this case, the outputs of the S coordinate adder 84 and Tcoordinate adder 94 are changed as follows.

    00100000→01000000→01100000→00000000→00000000.fwdarw.

Therefore, the texture pattern stored in the area A₀₀ in FIG. 44 can berepeatedly read out.

As mentioned above, since the upper bits of the S adder 84 and T adder94 are fixed to the values of the S increased amount register 82 and Tincreased amount register 92 by the S coordinate register 80 and Tcoordinate register 90, the area in the memory section 210 is dividedand the pattern can be repeatedly read out from the divided area.

INTERPOLATION OPERATING MECHANISM OF PIXEL COLOR VALUE

FIG. 45 shows an interpolation calculating mechanism of pixels which areused for drawing of the frame memory which is realized by each of thedrawing processing units provided for the 3-dimensional drawingmechanism 22 shown in FIG. 9. As shown in FIG. 46A, on the basis of twovertex pixels whose RGB color values are known and are indicated byblack dots, in order to execute the interpolating calculation by settingthe left side to a start point and setting the right side to an endpoint, an arithmetic operation control section 300 calculate changeratios .increment.D_(R), .increment.D_(G), and .increment.D_(B) of theRGB color values between the vertex pixels. In this case,

    .increment.D.sub.R =-1.2

    .increment.D.sub.G =+2.2

    .increment.D.sub.B =+1.0

RGB initial values D₀ of the visual point pixel are set to 7, 2, and 7.

The initial values D₀ of the start point pixel obtained by thearithmetic operation control section 300 by the selection by a selector302 are first set into a first register 304 in FIG. 45. Change values.increment.D obtained by the control section 300 are set into a secondregister 306. Since the color values have three components of RGB asshown in FIG. 46A, it is possible to provide three interpolationoperating mechanisms in FIG. 45 and to execute parallel arithmeticoperations or it is also possible to sequentially calculate RGB by usingone interpolation operating mechanism. An adder 308 adds the color valueD of the first register 304 and the change value .increment.D of thesecond register each time the pixel position is increased and stores theresult of the addition into the first register 304 through a selector310. A storage value D of the first register 304 in this instance isequal to the color value of the pixel. A similar adding process isrepeated until the pixel position is increased to the final pixelposition.

In the case where the selector 310 has been fixed to the output of theadder 308, as shown in FIG. 46B, when the final pixel indicated by ablack dot at the right edge is calculated, the R component causes anunderflow and is set to 15. The G component causes an overflow and isset to 0. According to the invention, therefore, when the adder 308causes an underflow by the calculation of the final pixel of the Rcomponent, the minimum value D_(min) =0 as a color value of the pixel atthe left edge is selected from the control section 300 by a selector 312and is outputted. When the adder 308 causes an overflow by thecalculation of the final pixel of the G component, the maximum valueD_(max) =0 as a color value of the pixel at the left edge is selectedfrom the control section 300 by the selector 312 and is outputted. Dueto this, as shown in FIG. 47C, even when the adder causes an underflowor overflow at the final pixel position, the correct color values R=0and G=15 can be obtained.

IMAGE SYNTHESIS

FIG. 47 shows in detail the 3-dimensional drawing mechanism 22 in caseof coupling three units in FIG. 3. In the embodiment, frame buffers 800,802, and 804 and Z buffers 806, 808, and 810 are provided for drawingprocessing sections 320-1 to 320-3 provided for the units 500-1 to500-3. As shown in FIG. 9, each of drawing processing sections 320-1 to320-3 has eight drawing processing units. 3-dimensional drawinginformation is supplied in parallel by eight channels to each drawingprocessing section. The 3-dimensional drawing information has3-dimensional coordinates (x, y, z) and RGB pixel data per one pixel.The RGB pixel data is written into the frame buffers 800, 802, and 804on a picture plane unit basis by the address designation by the XYdisplay coordinate values (x, y). The depth coordinate value z of eachpixel, namely, the z value is written into the Z buffers 806, 808, and810 on a picture plane unit basis by the address designation by the XYdisplay coordinate values (x, y). The z values in the Z buffers 806,808, and 810 are used in the hidden image process when a plurality ofpicture planes are synthesized by depth data control mechanisms 24-1,24-2, and 24-3 and the synthesized image data is stored into thetransfer buffer 36 of the 2-dimensional drawing mechanism 26 of a unit500-1. Further, a Z register 812 is provided. The Z register 812 allowsthe z value when a background picture plane or the like such that thedepth coordinate values of all of the pixels are equal is drawn to bestored into the frame buffer 800. When the z value is stored into the Zregister 812, the z value of every pixel is not written into the Zbuffer 806, so that the Z buffer 806 becomes an unused buffer. Eitherone of the Z buffer 810 and the Z register 812 is selected by using aselector 814. In case of synthesizing three images stored in the framebuffers 800, 802, and 804, the depth control mechanisms 24-1 to 24-3write the RGB pixel data having the minimum z value among the three zvalues read out from the Z buffers 806, 808, and 810 into the transferbuffer 36 as effective data.

FIG. 48 shows a picture plane synthesizing process according to theembodiment of FIG. 47. A background 316 is drawn in the frame buffer800. All of the z values are set to the same value "200" and this valueis written into the Z register 812. A car 318 is drawn in the framebuffer 802 and the z value is set to "20". A car 320 is drawn in theframe buffer 804 and the z value is set to "10". Further, a background322 which is used to synthesize the next picture plane is stored intothe Z buffer 806 which can be used as a work buffer by using the Zregister 812.

In the above state, the following operations are executed. First, whenthe whole control section 10 notifies the use of the Z register 812 tothe drawing processing section 32, a write enable state into the Zregister 812 is formed. Subsequently, since the 3-dimensional drawingdata of the background 316 is supplied under control of the wholecontrol section 10, RGB pixel data of the background 316 is firstwritten into the frame buffer 800 by the address designation by the XYdisplay coordinates (x, y). Subsequently, the writing operation into theframe buffer 806 is executed. However, since the use of the Z register812 has been instructed from the whole control section 10, the z value"200" as a same value in the whole background 316 drawn in the framebuffer 800 is written. After that, the car 318 is drawn into the framebuffer 802 and the z value is written into the Z buffer 808. In thiscase, the z value of the car 318 is set to "20" and all of the z valuesof the background are set to "255" and the value larger than the z value"200" of the background 316 is used. Further, the car 320 is drawn intothe frame buffer 804 and the z value is written into the Z buffer 810.In this case, the z value of the car 320 is set to "10" and all of the zvalues of the background are set to "255". Further, the drawingprocessing section 320-1 draws the background 322 which is used in thesynthesis of the next picture plane into the Z buffer which is in anunused state. In this instance, the host computer notifies the drawingunit 500-1 so as to draw another background into the unused Z buffer806. After completion of the drawing operation by the 3-dimensionaldrawing mechanism 22, a merge control is instructed from the wholecontrol section 10 to the depth data control mechanisms 24-1 to 24-3.The depth data control mechanisms 24-1 to 24-3 read out the z valuesevery pixel from the Z register 812 and Z buffers 808 and 810. However,it is sufficient to execute the reading operation from the Z register812 only the first time. Among the three z values read out, the minimumvalue on this side is discriminated. The RGB pixel data is read out fromeither one of the frame buffers 800, 802, and 804 corresponding to theminimum z value and written into the transfer buffer 36 of the2-dimensional drawing mechanism 26. By the above processes, thesynthetic image which was hidden-image processed in accordance with thez values in the case where the cars 318 and 320 were put in front of thebackground 316 is drawn in the transfer buffer 36. As shown in FIG. 9,the synthetic image in the transfer buffer 36 is transferred to thedisplay frame memory 38. After that, it is read out from the displaycontrol section 40 and is displayed on the color display 28.Subsequently, when a switching instruction of the background is receivedfrom the whole control section 10, the background 322 which haspreviously been drawn in the Z buffer 806 is read out and is transferredto the frame buffer 800 at a high speed. Due to this, in the framebuffer 800, an image is drawn to a picture plane at a high speed fromthe background 316 to the background 322 and an image synthesis usingthe next background 322 is executed. In FIG. 47, the Z register 312which can be switched by the selector 814 has been provided for only theZ buffer 806 of the unit 500-1. However, Z registers which can beswitched by the selector can be also similarly provided with respect tothe Z buffers 808 and 810 of other remaining units 500-2 and 500-3.

ARRANGE Z BUFFER INTO MAIN STORAGE UNIT

FIG. 49 shows an embodiment of the present invention with respect to aworkstation as an example. A main storage unit 418 is connected througha main memory control unit 416 to a main bus 412 as a bus of a CPU 410provided for a workstation. Further, a cache memory 414 as a secondarymemory device is connected to the main bus 412. Only when the cachememory 414 doesn't hit, the CPU 410 accesses the main storage unit 418.Since the cache memory 414 is provided, a frequency of the accessingtimes of the main storage unit 418 is reduced and a high processingspeed can be realized. A 3-dimensional drawing mechanism 420 isconnected to the main bus 412 of the CPU 410. Frame memories 422, 424,and 426 from/into which the RGB pixel data is read and written by theaddress designation by the 2-dimensional coordinates (x, y) are providedfor the 3-dimensional drawing mechanism 420. At least three framememories are necessary to synthesize and draw 3-dimensional images. TheRGB pixel data before synthesis is stored into two of the three framememories. The RGB pixel data of the synthetic image which is obtained bysynthesizing two 3-dimensional images in the depth direction is storedinto one remaining frame memory. Although the frame memories 422, 424,and 426 are separately shown for convenience of explanation, one memoryunit can be also divided into three memory areas and used.

After the frame memories 422, 424, and 426, a display control section428 is provided. The display control section 428 reads out the syntheticimage obtained by synthesizing two images from the special frame memoryand converts into the analog signal and displays on a color display 430after that. The display control section 428 has a lookup table toperform various kinds of color conversions. For example, in case ofusing a palette converting mechanism in order to reduce the number ofbits of the pixel data in the 3-dimensional drawing mechanism 420, thereis executed a process for converting the pixel data processed as addressdata of a palette table into the original RGB data by the lookup tableof the display control section 428. In case of the color display 430, itis sufficient to use the RGB data. However, in the case where a printerusing a CMYK space is used as an output apparatus, the color conversionfrom the RGB space into the CMYK space is executed. It is also possibleto convert from the RGB space into the XYZ space, L*a*b* space, L*u*v*space, or an HSB space or SSV space which is known as a color spacewhich reflects the color perception of human being and which expressesthree components of hue, saturation, and brightness, or the like.Moreover, in the case where the RGB space has linear characteristics,the color resolution can be also increased by converting the linearcharacteristics into the non-linear characteristics or by executing abit-up process to increase the number of bits of the pixel data.

The 3-dimensional drawing mechanism 420 has a local bus 432 in additionto the main bus 412 and is connected to the CPU 410 through the main bus412 and is also directly connected to the main memory control unit 416through the local bus 432. The control unit 416 accepts both of theaccess from the main bus 412 of the CPU 410 and the access from thelocal bus 432 of the 3-dimensional drawing mechanism 420 and executesthe writing or reading operation of the main storage unit 418. When theaccess from the main bus 412 competes with the access from the local bus432, the access having a higher priority is selected in accordance withthe setting of the priority mode at that time and the reading or writingoperation of the main storage unit 418 is executed. A Z buffer area 434which has previously been allocated to the 3-dimensional drawingmechanism 420 is assured in the main storage unit 418. The 3-dimensionaldrawing apparatus 420 accesses the Z buffer area 434 by using the localbus 432.

FIG. 50 shows in detail the 3-dimensional drawing mechanism and the mainmemory control unit connected by the local bus in FIG. 49. The drawingmechanism 420 has an address register 438 to generate an address toaccess the Z buffer area 434 in the main storage unit 418. The addressregister 438 has an upper offset address 440 and lower X address 442 andY address 444. The offset value up to the start position of the Z bufferarea 434 provided for the main storage unit 418 is set into the offsetaddress 440 by the CPU 410. In the embodiment, since the three framememories 422, 424, and 426 are provided, the Z buffer area 434 in themain storage unit 418 is divided into three buffer areas 434-1, 434-2,and 434-3 in correspondence to the frame memories 422, 424, and 426.Therefore, three offset values corresponding to the divided buffer areas434-1 to 434-3 are prepared. The offset values adapted to the accessesof the frame memories 422, 424, and 426 are set as an offset address 440into the address register 438.

As mentioned above, the CPU 410 arbitrarily changes the value of theoffset address 440 as necessary and can set the Z buffer area 434 intoan arbitrary area in the main storage unit 418. The 2-dimensionalcoordinates (x, y) which are used for address designation when the CPU410 accesses the frame memory 422, 424, or 426 are set every pixel intothe X address 442 and Y address 444 of the address register 438. Thevalues of the X address 442 and Y address 444 are used to designate thedrawing address of the frame 422, 424, or 426 and is also used foraddress designation of the z data storing position of either one of thedivided buffer areas 434-1 to 434-3 designated by the offset address ofthe main storage unit 418.

The CPU 410 now handles a 3-dimensional object expressed by a set ofpolygons using micro triangles or quadrilaterals. Each polygon isconstructed by the vertex coordinates (x, y, z) and the color value, forexample, RGB data of each vertex. When the 3-dimensional object isdrawn, the CPU 410 develops the vertex coordinates (x, y, z) of thepolygon into the pixels which bury the surfaces of the polygon. The CPU410 supplies the pixel coordinates (x, y, z) and the pixel RGB data tothe 3-dimensional drawing mechanism 420 as 3-dimensional drawing dataevery pixel. The 3-dimensional drawing mechanism 420 sets the2-dimensional coordinates (x, y) in the 3-dimensional drawing data (x,y, z: RGB pixel data) supplied from the CPU 410 into the X address 442and Y address 444. The RGB pixel data from the CPU 410 is given to aframe control section 435 and is written into either one of the framememories 422, 424, and 426 by the address designation by the2-dimensional coordinates (x, y). Further, the z data indicative of thedepth coordinates of each pixel supplied from the CPU 410 is given tothe main memory control unit 416 from a depth control section 436through the local bus 432. The z data is written into either one of thedivided buffer areas 434-1 to 434-3 of the main storage unit 418designated by the offset value of the address register 438. That is, thez data supplied from the CPU 410 is given to the control unit 416 from aselector 450 through the local bus 432. An address selector 446 and adata selector 448 are provided for the control unit 416 and can selecteither one of the main bus 412 and the local bus 432. For the depthcontrol unit 436, either one of the divided buffer areas 434-1 to 434-3is designated by the offset address 440 set in the address register 438.The z data from the CPU 410 is also written into the address which isdesignated by the X address 442 and Y address 444 in the designatedarea.

After the 3-dimensional drawing data was stored into the frame memoryand the Z buffer area 434, a synthesizing process of a plurality ofpicture planes is executed by the depth control section 436 by usingregisters 454 and 456, a comparator 458, and the frame control section435 provided in the 3-dimensional drawing mechanism 420. It is nowassumed that the first image is drawn in the frame memory 422, the depthcoordinates of the first image are stored as z₁ data into the dividedbuffer area 434-1, the second image is drawn in the frame memory 424,and the depth coordinates of the second image are stored as z₂ data inthe divided buffer area 434-2. In this state, when the CPU 410 instructsthe merge control to synthesize two picture planes stored in the framememories 422 and 424, the read address is set from the CPU 410 into theaddress register 438 of the 3-dimensional drawing mechanism 420. Namely,when the offset value of the divided buffer area 434-1 is set, the first2-dimensional coordinates (x, y) are simultaneously set. The depthcontrol section 436 requests the read access to the main memory controlunit 416 through the local bus 432. The selector 446 of the control unit416 selects the address value of the address register 438 which issupplied through the local bus 432. The z₁ data of the divided bufferarea 434-1 of the control unit 416 corresponding to the frame memory 422is read out and set into the register 454. Subsequently, the value ofthe offset address 440 is updated to the offset value of the dividedbuffer area 434-2 corresponding to the frame memory 424. The address inthe area is designated by the value of the same X address 442 and Yaddress 444 and the z₂ data is read out and set into the register 456.The switching and setting to the registers 454 and 456 are performed bya selector 452.

When the depth data z₁ and z₂ of the same frame address of two pictureplanes can be set into the registers 454 and 456, the comparator 458compares the two depth data z₁ and z₂. The result of the comparison issupplied as selection information to the frame control section 435. Theframe control section 435 makes smaller one of the two depth data z₁ andz₂, that is, the data locating on this side effective and designateseither effective one of the frame memories 422 and 424 by the X address442 and Y address 444 at that time, thereby reading the RGB pixel data.The read RGB pixel data is written to the memory location designated bythe same X address 442 and Y address 444 in the frame memory 426 forsynthesis. By executing the synthesizing process using the depthinformation with respect to all of the pixels, the 2-dimensional imagedata synthesized in accordance with the depth information in the framememory 426 can be drawn. The synthetic image data drawn in the framememory 426 is transferred to the display control section 428 at a frameperiod is subjected to a desired conversion by the lookup table. Afterthat, the image data is converted into the analog signal and isdisplayed as an image by the color display 430.

In the embodiment of FIGS. 49 and 50, three frame memories are providedto simplify the explanation. However, the number of frame memories canbe properly decided in accordance with the number of depth images whichare synthesized by the 3-dimensional drawing mechanism 420. As a Zbuffer area 434 which is prepared in the main storage unit 418, it issufficient to prepare the Z buffer area of only the necessary capacityin accordance with the number of picture planes, namely, the number offrame memories which are used to synthesize the depth images.

FIG. 51 shows another embodiment of the invention in which a Z buffer isprovided in the main storage unit. The embodiment is characterized inthat in order to reduce a burden of processes on the CPU side, a drawingoperating mechanism to develop the 3-dimensional data expressed by apolygon into the 3-dimensional drawing data of the pixel unit isprovided on the 3-dimensional drawing mechanism side. In FIG. 51, themain storage unit 418 is connected to the main bus 412 of the CPU 410through the cache memory 414 and the main memory control unit 416. Theabove portion corresponds to the whole control section 10 shown in FIG.3. The main bus 412 corresponds to the system bus 16. On the other hand,a 3-dimensional graphics drawing unit 600 is connected to the main bus412 of the CPU 410. The drawing unit 600 is constructed by: a drawingoperating mechanism 460; a 3-dimensional drawing mechanism 462; framememories 422 and 424 for drawing; a depth control mechanism 464; a2-dimensional drawing mechanism 466; frame memory 426; and displaycontrol section 428. The drawing operating mechanism 460 receives thevertex coordinates (x, y, z) of the polygon in the CPU 410 and the3-dimensional data which is constructed by the vertex RGB data (colorvalues) and executes various kinds of processes which are necessary forthree-dimensionally drawing. After that, the drawing operating mechanism460 develops into the 3-dimensional drawing data as a set of pixelswhich bury the surfaces of the polygon and supplies the pixelcoordinates (x, y, z) and RGB pixel data every pixel to the3-dimensional drawing mechanism 462. The drawing mechanism 462 writesthe RGB pixel data into the frame memories 422 and 424 by the addressdesignation by the 2-dimensional coordinates (x, y). At the same time,the drawing operating mechanism 460 accesses the self divided bufferareas 434-1 and 434-2 in the Z buffer area 434 of the main storage unit418 by the local bus 432 via the main memory control unit 416 and writesthe z data corresponding to the writing pixels of the frame memories 422and 424. That is, the 3-dimensional drawing mechanism 462 has a functionas a write control section to the Z buffer area 434 of the depth controlsection 436 provided for the 3-dimensional drawing mechanism 420 in FIG.50.

The depth control mechanism 464 performs a depth synthesis of the imagesstored in the frame memories 422 and 424. The depth control mechanism464 executes the read access of the main storage unit 418 through thelocal bus 432 and main memory control unit 416 by using the XY addressesto read the frame memories 422 and 424 and the offset address set by theCPU 410. By the read access, two depth data z₁ and z₂ are read out fromthe Z buffer area 434 every frame memories 422 and 424. The frame memorycorresponding to the smaller depth data is made effective and the RGBdata is read out and supplied to the 2-dimensional drawing mechanism466. The 2-dimensional drawing mechanism 466 writes the RGB datasupplied from the depth control mechanism 464 into the display framememory 426 by the designation of the XY addresses at that time. Byexecuting the above processes for one picture plane, the synthetic imagein the depth direction of two picture planes can be obtained in theframe memory 426. The 2-dimensional drawing mechanism 466 can directlybe subjected to the window control by the main bus 412 of the CPU 410 inaddition to the transfer and writing operations into the display framememory 426 of the depth synthetic image from the depth control mechanism464. While the window control is being executed by the CPU to the2-dimensional drawing mechanism 466, according to the embodiment, sincethe 3-dimensional drawing side can independently operate, the3-dimensional drawing operations into the frame memories 422 and 424 canbe executed in parallel during such a period of time.

In the embodiment of FIG. 51, by providing the drawing operatingmechanism 460 for the 3-dimensional graphics drawing unit 500, theburden on the CPU 410 is reduced and the drawing performance is raised.However, it is also possible to realize the function of the drawingoperating mechanism 460 by the CPU 410 and by arrange the CPU 410 afterthe 3-dimensional drawing mechanism 462. In the above embodiment,although the Z buffer area 434 of the main storage unit 418 has beenshown as one area, the Z buffer area can be also arbitrarily distributedand arranged in the main storage unit.

The present invention is not limited to the foregoing embodiments butmany modifications and variations are possible within the spirit andscope of the appended claims of the invention. The invention is also notlimited by the numerical values shown in the embodiments.

What is claimed is:
 1. A 3-dimensional graphic drawing apparatuscomprising:a plurality of texture pattern memory means, each texturepattern memory means storing a texture plane pattern comprising a set oftexture pixel data into an address designated by 2-dimensional STtexture orthogonal coordinate values (s, t); display memory means forwriting pixel data of said texture pattern to an address designated by2-dimensional XY display coordinate values (x, y) corresponding to adisplay screen and for storing a 2-dimensional projection image of asurface shape of a 3-dimensional object; a plurality of mapping meansfor producing 2-dimensional UV surface shape coordinate values (u, v) ofa 3-dimensional object defined by a set of polygons to which the surfaceshape is projected, for converting the coordinate values (u, v) into thecoordinate values (s, t), for reading out corresponding texture pixeldata, for designating the coordinate values (x, y) corresponding to thecoordinate values (u, v), and for writing the designated coordinatevalues (x, y) into said display memory means, each of said plurality ofmapping means being paired with one of said plurality of texture patternmemory means; parallel processing means for reading texture patterns ofthe same size and the same pattern from an external memory device, forstoring the texture patterns into said plurality of texture patternmemory means, for making said plurality of mapping means operative, forreading the texture pixel data at the different coordinate convertingpositions from the same texture patterns stored in a corresponding oneof said texture pattern memory means, and for enabling the texture pixeldata to be simultaneously written into said display memory means; andtime-division processing means for reading different kinds of texturepatterns of the same size and different patterns, for storing thetexture patterns into said plurality of texture pattern memory means,for selecting one of the pairs of said plurality of texture patternmemory means and said plurality of mapping means in accordance with thepattern to be mapped, for making the selected pair operative, forreading the texture pixel data at the coordinate converting position ofthe texture pattern of the selected pattern, and for writing the texturepixel data into said display memory means.
 2. An apparatus according toclaim 1, wherein N pairs of texture pattern memory means and mappingmeans are provided wherein N is the number of lines in an X-axisdirection which are simultaneously mapped into said display memorymeans.
 3. An apparatus according to claim 1, wherein each of saidmapping means comprises:surface shape coordinate generating means forgenerating the coordinate values (u, v); conversion coefficientgenerating means for generating initial values of the ST texturecoordinates (s₀, t₀) and increased amount values (K₁, K₂) for use in thecoordinate conversion between said coordinates from the vertexcoordinate values (u, v) and vertex coordinate values (s, t)corresponding to said vertex coordinate values (u, v); S coordinateregister means for holding an S coordinate initial value (s₀) of the STtexture coordinates; S coordinate adding means for adding the Scoordinate initial value (s₀) and the S coordinate increased amountvalue (K₁) each time a coordinate value (u) of the UV surface shapecoordinates between the vertexes is inputted, and for placing the resultof the addition as a new S coordinate value (s) into the S coordinateregister means; T coordinate register means for holding the T coordinateinitial value (t₀) of the texture coordinates; T coordinate increasedamount register means for holding the T coordinate increased amountvalue (K₂) of the texture coordinates; and T coordinate adding means foradding the T coordinate initial value (t₀) and the T coordinateincreased amount value (K₂) each time a coordinate value (v) of the UVsurface shape coordinates between the vertexes is inputted, and forplacing the result of the addition as a new T coordinate value (t) intothe T coordinate register means.
 4. An apparatus according to claim 3,wherein the S coordinate increased amount value (K₁) is given by

    K.sub.1 =(s.sub.e -s.sub.0)/(u.sub.e -u.sub.0)

wherein two pixel vertex coordinate values in the U-axis direction ofthe UV surface shape coordinates are set to (u₀, v₀) and two pixelvertex coordinate values in the S-axis direction of the ST texturecoordinates are set to (s₀, t₀) and (s_(e), t₀).
 5. An apparatusaccording to claim 3, wherein the T coordinate increased amount value(K₂) is given by

    K.sub.2 =(t.sub.e -t.sub.0)/(v.sub.e -v.sub.0)

wherein coordinate values of two pixel vertexes in the V-axis directionof the UV surface shape coordinates are set to (u₀, v₀) and (u₀, v_(e))and coordinate values of two pixel vertexes in the T-axis direction ofthe ST texture coordinates are set to (s₀, t₀) and (s₀, t_(e)).